.class public Lcom/TwinBlade/PicturePassword/SetupWizard;
.super Landroid/app/Activity;
.source "SourceFile"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/content/SharedPreferences;

.field private b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

.field private c:Landroid/widget/Button;

.field private d:Landroid/widget/Button;

.field private e:Landroid/widget/Button;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 15
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/SetupWizard;)Landroid/content/SharedPreferences;
    .locals 1
    .parameter

    .prologue
    .line 17
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    return-object v0
.end method

.method private a()V
    .locals 2

    .prologue
    .line 163
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    const v1, 0x7f040003

    invoke-virtual {v0, p0, v1}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->setInAnimation(Landroid/content/Context;I)V

    .line 164
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    const v1, 0x7f040004

    invoke-virtual {v0, p0, v1}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->setOutAnimation(Landroid/content/Context;I)V

    .line 165
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->showNext()V

    .line 167
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    .line 168
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->d:Landroid/widget/Button;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    .line 170
    :cond_0
    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 3
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v2, 0x4

    const/4 v0, -0x1

    const/4 v1, 0x1

    .line 126
    invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V

    .line 127
    packed-switch p1, :pswitch_data_0

    .line 160
    :goto_0
    return-void

    .line 129
    :pswitch_0
    if-ne p2, v0, :cond_0

    .line 130
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->a()V

    goto :goto_0

    .line 132
    :cond_0
    const v0, 0x7f0900c7

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v2, v1}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    goto :goto_0

    .line 137
    :pswitch_1
    if-ne p2, v0, :cond_1

    .line 138
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->a()V

    goto :goto_0

    .line 140
    :cond_1
    const v0, 0x7f0900c8

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v2, v1}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    goto :goto_0

    .line 145
    :pswitch_2
    if-ne p2, v0, :cond_2

    .line 146
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->a()V

    goto :goto_0

    .line 148
    :cond_2
    const v0, 0x7f0900c9

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v2, v1}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    goto :goto_0

    .line 153
    :pswitch_3
    if-ne p2, v0, :cond_3

    .line 154
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->d:Landroid/widget/Button;

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    goto :goto_0

    .line 156
    :cond_3
    const v0, 0x7f0900ca

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v2, v1}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    goto :goto_0

    .line 127
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method public onClick(Landroid/view/View;)V
    .locals 6
    .parameter

    .prologue
    const/4 v5, 0x2

    const/4 v4, 0x3

    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 63
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sparse-switch v0, :sswitch_data_0

    .line 122
    :cond_0
    :goto_0
    return-void

    .line 66
    :sswitch_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    if-nez v0, :cond_2

    .line 67
    const v0, 0x7f0900c5

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v4, v2}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    .line 70
    invoke-static {p0}, Lcom/TwinBlade/PicturePassword/bd;->a(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 71
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/GesturePreferencesPlus;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 75
    :goto_1
    invoke-virtual {p0, v0, v3}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    .line 73
    :cond_1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/GesturePreferences;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    goto :goto_1

    .line 76
    :cond_2
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    if-ne v0, v2, :cond_3

    .line 77
    invoke-static {v3, v3}, Lcom/TwinBlade/PicturePassword/Utilities;->a(ZZ)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 78
    const v0, 0x7f0900c6

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v4, v2}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    .line 80
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/Image;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 81
    invoke-virtual {p0, v0, v2}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    .line 83
    :cond_3
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    if-ne v0, v5, :cond_4

    .line 84
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/SaveActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 85
    const-string v1, "Code"

    const-string v2, "Save"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 86
    invoke-virtual {p0, v0, v5}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    .line 87
    :cond_4
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    if-ne v0, v4, :cond_5

    .line 88
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/SaveActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 89
    const-string v1, "Code"

    const-string v2, "Test"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 90
    invoke-virtual {p0, v0, v5}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startActivityForResult(Landroid/content/Intent;I)V

    goto/16 :goto_0

    .line 91
    :cond_5
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_6

    .line 92
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/AService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 93
    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 94
    const v0, 0x7f0900c1

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {p0, v0, v4, v2}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Landroid/content/Context;Ljava/lang/String;IZ)V

    .line 95
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "MainEnabled"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 96
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "ShowSetupWizard"

    invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 97
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->finish()V

    goto/16 :goto_0

    .line 99
    :cond_6
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->a()V

    goto/16 :goto_0

    .line 105
    :sswitch_1
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->getDisplayedChild()I

    move-result v0

    if-nez v0, :cond_7

    .line 106
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    const-string v1, "ShowSetupWizard"

    invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 107
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->finish()V

    goto/16 :goto_0

    .line 109
    :cond_7
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    const v1, 0x7f040002

    invoke-virtual {v0, p0, v1}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->setInAnimation(Landroid/content/Context;I)V

    .line 110
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    const v1, 0x7f040005

    invoke-virtual {v0, p0, v1}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->setOutAnimation(Landroid/content/Context;I)V

    .line 111
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;->showPrevious()V

    .line 112
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->d:Landroid/widget/Button;

    invoke-virtual {v0, v2}, Landroid/widget/Button;->setEnabled(Z)V

    goto/16 :goto_0

    .line 118
    :sswitch_2
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/TwinBlade/PicturePassword/SetupPIN;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 119
    invoke-virtual {p0, v0, v4}, Lcom/TwinBlade/PicturePassword/SetupWizard;->startActivityForResult(Landroid/content/Intent;I)V

    goto/16 :goto_0

    .line 63
    :sswitch_data_0
    .sparse-switch
        0x7f08001a -> :sswitch_2
        0x7f080037 -> :sswitch_1
        0x7f080038 -> :sswitch_0
    .end sparse-switch
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter

    .prologue
    const/4 v3, 0x1

    .line 28
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 29
    const v0, 0x7f030009

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->setContentView(I)V

    .line 31
    const v0, 0x7f08002b

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->b:Lcom/TwinBlade/PicturePassword/SetupWizardViewFlipper;

    .line 32
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    .line 34
    const v0, 0x7f080038

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->d:Landroid/widget/Button;

    .line 35
    const v0, 0x7f080037

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->c:Landroid/widget/Button;

    .line 36
    const v0, 0x7f08001a

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->e:Landroid/widget/Button;

    .line 38
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->d:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 39
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->c:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 40
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->e:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 42
    const v0, 0x7f080032

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/CheckBox;

    .line 43
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    const-string v2, "ForegroundService"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 44
    new-instance v1, Lcom/TwinBlade/PicturePassword/cq;

    invoke-direct {v1, p0}, Lcom/TwinBlade/PicturePassword/cq;-><init>(Lcom/TwinBlade/PicturePassword/SetupWizard;)V

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 51
    const v0, 0x7f080034

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/SetupWizard;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/CheckBox;

    .line 52
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/SetupWizard;->a:Landroid/content/SharedPreferences;

    const-string v2, "EasyWake"

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 53
    new-instance v1, Lcom/TwinBlade/PicturePassword/cr;

    invoke-direct {v1, p0}, Lcom/TwinBlade/PicturePassword/cr;-><init>(Lcom/TwinBlade/PicturePassword/SetupWizard;)V

    invoke-virtual {v0, v1}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    .line 59
    return-void
.end method
